<template>
	<view>
		<view class="my_add_box" :animation="animationData">

			<view @tap="rotateAndScale()">
				wwww
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				animationData: {},
				animation: {
					scale: "",
					top:""
				}
			};
		},
		mounted() {
			var animation = uni.createAnimation({
				duration: 1000,
				timingFunction: 'ease',
			})
			this.animation = animation
		},

		methods: {
			rotateAndScale() {
				// this.animation.top = 300
				console.log("???简历了吗")
				this.animation.translateY(-300).step()
				this.animationData = this.animation.export()
				// this.animationData = this.animation.export()
			},
			rotateThenScale: function() {
				// 先旋转后放大
				this.animation.rotate(45).step()
				this.animation.scale(2, 2).step()
				this.animationData = this.animation.export()
			},
			rotateAndScaleThenTranslate: function() {
				// 先旋转同时放大，然后平移
				this.animation.rotate(45).scale(2, 2).step()
				this.animation.translate(100, 100).step({
					duration: 1000
				})
				this.animationData = this.animation.export()
			}
		}
	}
</script>

<style lang="scss">
	.my_add_box {
		width: 90%;
		margin: 0 auto;
		height: 600upx;
		background-color: pink;
		position: fixed;
		bottom: -600upx;
		z-index: 99999;
		left: 50%;
		margin-left: -45%;
		border-radius: 10upx;

	}
</style>
